Good day
I have created a static library with Xcode. Then I compiled my ANE using adobe's ADT tool. Thereafter I've included the ANE in my FlashBuilder project. However, when attempting to package my project, I get the following error:
"Error occurred while packaging the application:
Undefined Symbols: "_obj_storeStrong", referenced from ...
.
"_obj_release", referenced from ...
.
"
My guess is that ARC is probably not supported for ANE's. I'm guessing that this is probably due to the fact that FlashBuilder is recompiling the entire AIR + the native libs into one iOS application, probably using their own compiler or something (which is why Air apps for iOS can be compiled on windows platforms as well), and this compiler is probably not 4.3 ready yet?
I have attempted adding the flag -fobjc-arc to my ios-platformoptions.xml as well (where this file is the parameter to the -platformoptions flag of adt), but still no joy. It results once again in an error when packaging. Perhaps any other flag I can try to use here?
Any corrections, suggestions, alternative ideas or comments will be most welcome. I am very new to Xcode, Objective C and ANE, so please excuse any incorrect statements or assumptions, and please correct me on these.
I would be glad if somebody can please confirm weather I am correct with my assumption that I cannot use ARC at this stage on ANE's.
Thanks
Christo
START EDIT:
Very late update, sorry.
You might be able to use ARC after all. There is a library called arc lite that I forgot to mention and it works. I created an ANE for MapKit on iOS targeting the 5.0.x SDK. When I tried to move to a device that only had 4.3.x ( could have been 4.3.3 or 4.3.5 ) the app crashed or would not compile. I found information on the arc lite library that is included in the newer sdks, followed the instructions on how to include this library and pow! A working ANE on a 4.3.x device without rewriting my code!
Hope all of this helps and half of my original comment :)
Markus
END EDIT
I don't think ARC is supported just yet. There isn't much to go on in terms of settings or examples of what the settings should be in Xcode. Take a look at any of the Xcode ANE projects you can get your hands on. You will see that most or all of the projects have:
Object-C Automatice Reference counting = NO
Objective-C++ Automatic Reference counting = NO
Take a look at the following:
Vibration ANE - On Adobe Devnet site
Liquid Photo - http://www.liquid-photo.com/2011/10/30/common-native-extension-issues/
Liquid Photo - http://www.liquid-photo.com/2011/10/28/native-extension-for-adobe-air-and-ios-101/
There are a lot of examples in Github but you have to find them via Google. Pull down the Xcode ANE projects and compare the settings.
Hope this helps!!!
Markus
Related
When I am trying to build my ios app in xcode, the build is failing due to lexical or preprocessor issue the error shows up like this
This was a problem specific to the react-native-device-info module.
For your specific case you may try v1.6.1 or higher (currently at 2.0 as of May 21, 2019) of the library and that should fix things for you.
For others interested more generally in the problem, this is a react-native library that uses native code, so it has an XCode project embedded within it for use in react-native after you run react-native link react-native-device-info. Unfortunately, the library was not including any directories in it's header search path, so it was of course unable to find the header files for the react-native objects it was using locally.
A library user proposed a change that fixed that problem for tvOS, and I extended the change to cover iOS as well, and now the library no longer generates errors like this for iOS or tvOS targets.
Perhaps someone with a similar issue may find the specific changes required for the fix useful in their projects
I'm currently migrating my project to Swift3 as I know that there is one bug I have under iOS 10 that needs to be fixed.
So I installed iOS 10 on one of my devices.
Now I can't run my app on the device, getting the 'Could not find developer disk image' error.
So I downloaded the latest Xcode8-beta.
Now my code can't be compiled - I first have to convert it to the newest syntax.
So while fixing all the non auto-converted syntax issues, I'm getting errors for frameworks I'm importing, too:
"Module file was created by an older version of the compiler"
Which - to my understanding - means that this framework needs to be recompiled with the current version of XCode.
This would mean that I would have to cross my fingers that all the frameworks I use are up-to-date, or otherwise, fix those, too?
Is it not possible at all to use 'deprecated' frameworks?
Is this Apple being super strict to get rid of any Swift1/2 code as possible?
This would mean that I would have to cross my fingers that all the frameworks I use are up-to-date, or otherwise, fix those, too?
Is it not possible at all to use 'deprecated' frameworks?
Is this Apple being super strict to get rid of any Swift1/2 code as possible?
Yup. Swift 3 is it.
I feel bad for those that had to convert their C code to swift 2, and now swift 3 is coming xD
Hopefully they will make the transition easier with the final release version, and that shortly after that all of the major frameworks will have been updated (for you to recompile).
You need to recompile the frameworks. Even frameworks managed with dependency managers like Carthage (which recompile on each update command) are still having problems with XCode 8 Betas / Swift 3: https://github.com/Carthage/Carthage/issues/1440
I'm making a swift .framework, but I'm running into what I believe is a build problem. So I've simplified everything to isolate my troubles. I've attached a screenshot of my newframework.framework project (top) and my example usage of the framework (bottom). The problem I'm having is that Whatever class is unavailable when I include newframework.framework. I can confirm that Whatever.swift is indeed included in target>>buildphases>>compile Sources
What could cause this not to work?
EDIT - Adding App Build phases screenshot
Your problem, as we figured out in comments, was that you were building your framework for "Generic iOS Device" and building your app for the simulator. Xcode can't make the app build without matching architectures, so you need to choose one over the other or produce a framework that includes every architecture.
(This was posted to help people who come here from the future find the answer quickly. Hello, future people!)
how can I fix this error?:
http://i.stack.imgur.com/zmZea.jpg
I got this error when compiling a simple c++ file but I don't know why
When I compile this file with iOS 6.1 sdk it works but I want it to work in iOS sdk 8.1
My iPad:ipad 3 wifi
My iOS version:8.4
It shouldn't be problem with the architecture. As far as I know Apple hasn't changed Armv7. From what I see, its a linker error, probably caused by libraries not being linked in correctly. Pretty clear when it says: ignoring nonexistent library. This type of error could occur if you import a header and fail to link it against the correct library OR if you just straight up include a header for the wrong architecture -_-.
So thats the diagnosis. I guess the rest of the hacking is up to you since no one here has any clue what you have done to the poor iPad.
An error occurs when compiling cocos2d-iphone v2.x and including arm64 architecture. The error is in the assembly code for kazmath. Is there a fix for this? (other than removing arm64)
libs/kazmath/src/neon_matrix_impl.c:
Unknown register name 'q0' in asm
Well, maybe no big deal... would be nice to support iPhone 5s etc fully with existing code.
I guess this is fixed or will be fixed in the cocos2d 3.x line. https://github.com/cocos2d/cocos2d-iphone/issues/534
Correct, cocos2d-iphone v3 does build successfully for the arm64 architecture, v2.x does not.
Even though the compiler warnings/errors are relatively easy to fix, there are a number of 64-bit compatibility issues that remain in v2.x (like CGFloat vs float mismatches and others) which means it's not recommended to enable arm64 builds for v2.x unless you're prepared to debug and fix these issues yourself. More so if you use 3rd party extensions which haven't been tested with arm64 either, for example anything in the cocos2d-iphone-extensions project.
Since currently no one is assigned to work on the v2.x branch and I don't expect v2.x to receive any future updates at all it's probably best to not include arm64 code (not much to gain anyway). Then start your next project with cocos2d-iphone v3.
I also had this problem in my one of old projects with Cocos2d.
I've downloaded Cocos2d v3, and copied the "kazmath" folder only to my older project, and replaced them.
If you don't want to change all the files, change :
#if defined(__ARM_NEON__)
into
#if defined(_ARM_ARCH_7)
By the way, I'm trying to update fully to the Cocos2d v3, and I think that is the right solution for this. even though my problem is handled, it is still problematic in general.
Cocos2D 2.2 now has 64 bit support!
You can download version 2.2 form here.
Upgrade your karmath library with cocos2D v3 kazmath lib (https://github.com/cocos2d/cocos2d-iphone/tree/develop-v3/external/kazmath).
It works for me (on iPad Air)
I solved in this way:
Downloading Cocos2D 2.2 here as suggested by #appzYourLife
Replaced folders cocos2d and CocosDenshion inside xcode project folder with folders of version 2.2
In folder kazmath/src edit mad4.c and neon_matrix_impl.c and replace line:
#if defined(__ARM_NEON__)
with
#if defined(_ARM_ARCH_7)