How to exclude a framework/files from a build target in XCode - xcode8

I'm building an application that leverages a 3rd party framework. The framework provides image recognition.
The challenge is that my app will not build in the simulator because the image recognition software requires a camera and they specified that in the build settings somewhere. I can only test on my iPhone 6S and iPad Pro.
I would like to remove the 3rd Party framework from the target so I can build in the simulator and make sure all my Auto Layout settings are correct for the rest of the app and other devices. I know how to remove files from the target. Are changes to the build setting necessary?

There are two things either you can comment the import of that 3rd party framework and also comment the code in which the 3rd party frame is being used.
Or you can check if camera available by adding this line of code in your api usage.
if ([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera]) {
//your 3rd party code here
}
You can also do some tricks in build phases by making it optional. But I am not sure how its gonna behave in this scenerio.

Related

Im having problem with the App Store framework distribution and cocoa-pods framework distribution

Im trying to distribute my custom build framework via cocoapods, Issue rise when i try to upload my application build with custom framework to Appstore throughs error in image below:
https://i.imgur.com/9Q8HO0U.png "tooltip"
and if i remove x86_64 architecture from the framework its unable to run on simulator.
So my question is:
How can i distribute my framework to work on device, simulator and App store?
I hope you first made a build for a generic IOS device instead of a simulator?
If that is the case do take look at this post which contains a bit about the architecture . You removing the above framework wont probably do it since it is a required one.
Submit to App Store issues: Unsupported Architecture x86
Let me know if it was of any help if not il look into it

How does react native compile it's code into native apps?

recently started working with react native and project requires for apps to be build on server. So the theory is that app could be build on request, which means something, lets call this something react native compiler, needs to be on some server which allows me to do this.
For example, this is the location where is react native compiler is "http://example.com/compile", and you have some settings options and button "compile" on that site, and when you click on button, application compiler starts, and after x seconds android and iphone apps are ready to be downloaded. Is this possible?
It is surely possible, although it might be complicated to implement, it all boils down to the level of complexity that you want to achieve (just a build system, an online IDE...).
Each React Native application consists of the JavaScript code and one Android and iOS projects (you can include more platforms through 3rd party efforts, but let's keep it simple). Both the iOS and Android SDKs offer command-line tools for the building functionality. In the case of iOS you have the xcrun command and in Android, the project includes some gradle commands that you can execute. So in general, what you have to do is just execute these commands via your backend when an user requests it.
Essentially what you need is the same kind of setup a Continuous Integration server would, but instead of triggering a build whenever changes are made, the server should build the app on demand, and then send back the result of the compilation to the user. You can read more about CI for React Native here and here, for instance.

How to enable every developer run my xcode project

I had written a static library in objective c. Then I wrote an sample app that show how to run the static library. I want many developers to be able to run this sample app on a real device and not on the simulator(it is a BLE app and it is not possible to operate it on a simulator). How can I do that?
You'd have to publish it on the app store, but really you want to demonstrate the code needed to use your library, so just include the demo Xcode project with the library and developers can run it on their own devices/simulators and change whatever they wish.
This also provides self-documentation on how to integrate your library with their app.

Phonertc demo only shows blank screen when call is started

I am using the phonertc demo project on iOS platform. The setup is done properly and app is deployed on iphone and iPad. But when I am calling a peer it just shows blank screen in the video controller div on the page. I am not sure what is happening, not able to get the code work. Please suggest!
Have you followed the steps in the Wiki for running the an PhoneRTC app on an iOS device:
(https://github.com/alongubkin/phonertc/wiki/Installation)
For iOS, follow these steps:
Go platforms/ios and click on [ProjectName].xcodeproj to open it with
XCode Go to your project settings In General, change Deployment Target
to 7.0 or above Go to Build Settings and change:
a. Valid Architectures => armv7
b. Build Active Architecture Only => No
c. Runpath Search Paths => $(inherited) #executable_path/Frameworks
d. Objective-C Bridging Header =>
[ProjectName]/Plugins/com.dooble.phonertc/Bridging-Header.h
e. Embedded content contains Swift Code => yes
Repeat steps 4a. - 4c. for the CordovaLib project
Make sure your build target is an actual iPhone or iPad running on the
arm7 architecture. The iPhone and iPad simulators are not emulators,
and only run on i386. The compiled RTC libraries for ios have been
built for arm7.

Getting sproutcore application files to use them in a native app via Appcelerator Titanium

I would like build a app using sproucore framework, but i also want to integrate it with Titanium to have some desktop capability like file system, packaging, offline working etc...
I know that with sproutcore 2 this would be pretty easy since it allows to use the framework like a normal javascript library. But the project is still in beta and the docs are patchy at most (I consider patchy even the 1.x docs, actually).
So, I want to ask, which would be the best way to go to integrate sproutcore and Titanium API?
Titanium's main mission is to use JavaScript to build native apps, not to provide a OS-access layer for web apps. It would be hard to mix native and SproutCore UI elements.
That being said, here's some information that might help you:
Titanium has reversed it's application model starting with version 1.0:
http://developer.appcelerator.com/question/71/what-happened-to-html--css
The main app doesn't run in a web view anymore, instead it runs directly in JavaScriptCore and creates only native UI elements. One of the native UI elements is a web view
(http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.WebView-object)
and it's possible to make that full screen and run your SproutCore app inside of the web view. From there, you can call out to Titanium to call Titanium methods for file system access and the like.
Also, if you only target the desktop, you could even access the JavaScript context object of a webview and use it directly in JavaScriptCore.
Johannes