My code uses an external library using dlsym (for reasons out of my control).
In order Xcode to find my library, I had to do 2 things:
-force_load "$(SRCROOT)/pathTo/myLibrary.a"
Dead-Code Stripping: NO
This works fine when running wit the debug profile. Both on the simulator and on a physical device, the library is loaded and works.
However if I create an AdHoc IPA file and install it on my device, this same library is no longer found.
What could be the difference?
This is what solved the issue:
In Build Settings → Deployment → Strip Linked Product, select
NO.
Related
I am trying to build my Cordova project for an iOS. I have borrowed a mac and an iphone in order to do this; meaning I am very new to everything apple-related.
From what I understand: in order to build anything for iOS, I need some sort of apple developer-account. (I believe the mac I am using has one, not quite sure.)
When I try to run the command: cordova run ios I get the following error:
Check dependencies
Code Signing Error: No profiles for 'io.cordova.hellocordova' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'io.cordova.hellocordova'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.2'
I don't know what any of the above means, or how to solve it. I believe I have to use xcode to somehow automatically created a build.json file (not sure), but I don't know how to open my cordova project in xcode.
I have been using Sublime to edit my cordova project files, and the terminal to use the cordova cli. I am running xcode 9.2
From what I understand: in order to build anything for iOS, I need some sort of apple developer-account. (I believe the mac I am using has one, not quite sure.)
If that is true, then you can try the following:
cordova build ios
open platforms/ios/<my-app-name>.xcworkspace
This will open the app in Xcode. Click on the icon (left hand side, above the directory structure view) "General" and check "Automatically manage signing". Try to run the app in Xcode.
Check this website for reference (and a picture of where to click in Xcode): http://cordova.apache.org/docs/en/7.x/guide/platforms/ios/index.html
As mentioned by #Dev_Tandel, you need to have a apple dev acct to run your app in a device. Refer link to get more info: https://developer.apple.com/support/certificates/
This issue is driving me nuts. I am asking it here before I announce it as a bug in XCode and try to use another version of XCode.
So, I am using XCode 8.3.2. I have a project that generates a static library. I am moving the .a file to another project and I use it (I know I can integrate the static library project in the second project but I don't want that here).
The file generated is 4.4MB. After copying the newly created .a and I copy it to the second project and test it, everything works fine. But when I come back to the library project and build it, the generated file is 2.3MB with missing symbols!!!
I cannot make it work unless I restart my MAC, or XCode somehow crashes.
What I have tried : Clean project, clean folder, delete Derived data, added -all_load -force_load -ObjC flags in my target linker flags.
If anyone has any idea about what is happening, please inform me.
Thanks!
It depends upon the target device you have selected during building your library. In Xcode, When you select any specific simulator or device, that time Xcode only creates single slice or thin product.
If you select Generic iOS device , means no device or simulator, that time Xcode create library having all the device slices and one folder having Simulator slice.
By using LIPO command you can put simulator and device slices together.
In your case, during first and second time, You are changing the device target from Generic iOS Device to specific device.
I have created an XCode project through Unity in order to build for iOS, and the build succeeds with a few warnings, but there is nothing in the build folder. It takes a few minutes to build, so it seems like it's doing something, but nothing is there.
When I deleted the empty placeholder build folders that come with the Unity-generated XCode project just to see if it creates anything, the build folder does not even get created. I have tried changing the bundle identifiers in Unity and on my provisioning profiles to match each other, but it hasn't helped.
I am building for Generic iOS Device as opposed to an actual Device connected to my Mac. Is that part of the issue?
Jean Luc answered this question, but he wrote a comment, so I am posting it here for clarity:
you build the binary through Product > Archive, after building the Organizer Windows appears where you can export a binary either for ad hoc or app store deployment
I have a framework I finished writing (with bit code enabled). I want to know how much is my framework is adding to an app after they upload the app to the store.
I understood that i need to archive the app to ad hoc and choose a variant (a device) then recompile with out my framework and see what is the difference.
When i compile the demo app with bitcode. After selecting ad hoc it won't le me select variant xcode returns 14 domain error.When i remove bit code i can see the variants. Is this ok ?
You could simply create a Simple View Application and archive then export it once with your framework and once without. Then compare the two IPA sizes.
Update
To have the size for all architectures, export your iPA with the Export one app for all compatible devices option.
If you need to have the size for a special architecture use the Export for specific devices option.
I've made an app with Codea and exported to an XCode project. Is there way to build it on IOS (or windows)?
Definitely.
Some folks over at iNinjas have successfully ported the Clang-LLVM toolchain to run on iOS. Here's a download link - install the deb on your iOS device. You will also have to copy the development sysroot (the iPhoneOSX.Y.sdk folder) from your computer to your mobile device. The device also has to be jailbroken.
(I don't remember exactly if there are any other packages to install, but perhaps odcctools from Cydia, etc, just google it.)
After that, you have to compile and link all the files. Of course, Xcode uses a proprietary format for project files, so you can't just go ahead and expect the compiler to build from the Xcode project, but you have to, for example, write a Makefile to specify that all .m files are to be compiled. Then you will have an executable file which you may or may not need to codesign.
Here is a tutorial on creating an app from your Codea/Xcode project:
http://codeatuts.blogspot.nl/2012/08/tutorial-12-submitting-to-app-store.html
Well, if you already have a mac, you can use Dringend to compile it from your iPad. It requires a program running on your mac that will do that actual compiling, and then send the file back to Dringend on your iPad, which will install it. This requires having a mac, but will let you program on your iPad away from your mac. This also requires an iOS developer license, for the code signing identities.