Using xib in iOS Ane?

I'm developing an ANE which makes use of an xib view.
How do I package this within the ANE?
The app keeps crashing because it can't find the nib so I'm assuming I need to package it somehow into the ANE?
Can I just place it within the same directory with other assets like png files etc?

We got storyboards to work in an ANE by putting them in a static .framework.  It should also work with xib files.  (dynamic frameworks don't work)
First, we compiled the .a in the ANE against the framework by putting it in the "link binary with libraries" build phase.
Then, in the platform-ios.xml file, we added the framework as a packaged depenency:
    <packagedDependencies>
        <packagedDependency>myframework.framework</packagedDependency>
    </packagedDependencies>
Then, in the build script for the ANE, we had to make sure to include all the framework assets, including storyboards, in the iPhone-ARM directory of the ANE:
cp -R ../ios/Build/Products/Release-iphoneos/myframework.framework/mystoryboard~ipad.storyboardc iPhone-ARM/
cp -R ../ios/Build/Products/Release-iphoneos/myframework.framework/mystoryboard~iphone.storyboardc iPhone-ARM/
Then, in the packaging command, we have to reference the platform-ios.xml file:
adt -package -target ane mynativeextension.ane extension.xml -swc mynativeextension.swc \
  -platform iPhone-ARM -platformoptions platform-ios.xml myframework.framework -C iPhone-ARM/ . \
  -platform default -C default/ .
The following pages really helped:
Adobe Flash Platform * Including resources in your native extension package
http://help.adobe.com/en_US/air/extensions/WSf268776665d7970d-2482335412ffea65006-8000.htm l
Building a native extension for iOS and Android – Part 1: Getting started with volume control | Adobe Developer Connecti…
It's complicated, but in the end we were able to include PNGs, sound files, storyboards, and even custom fonts for the native views to use.
I wrote an article explaining how to do the custom fonts, sometime I need to do the same about including xibs/storyboards.......
ANE for iOS with Custom Framework – Using Custom Fonts | khef.co
Good luck, ask questions if you need to!

Similar Messages

  • Problem with ANE - "ld: -pie can only be used when targeting iOS 4.2 or later"

    I'm trying to compile a simple AIR Mobile app for iOS, incorporating an ANE to support Localytics
    http://flashsimulations.com/2012/06/18/localytics-adobe-air-native-extension/
    Compilation fails with the message "ld: -pie can only be used when targeting iOS 4.2 or later"
    Surely 7.0 is later than 4.2! (I'm using Flex 4.6 - AIR 3.9 SDKS). Tried building with FDT and with Flash CC, and against earlier versions of the iOS SDK (6.0, 5.0).
    Any suggestions?

    thanks, but can you be more specific? Presumably I add something in this part:
        <iPhone>
            <InfoAdditions><![CDATA[<key>UIDeviceFamily</key>
                                                  <array>
                                                      <string>1</string>
                                                      <string>2</string>
                                                  </array>
                                                  <key>UIStatusBarStyle</key>
                                                  <string>UIStatusBarStyleBlackOpaque</string>
                                                  <key>UIRequiresPersistentWiFi</key>
                                                  <string>YES</string>]]></InfoAdditions>
            <requestedDisplayResolution>high</requestedDisplayResolution>
        </iPhone>

  • AIR 3.8.0.440 / iOS: build fails with "ld: -pie can only be used when targeting iOS 4.2 or later"

    With AIR 3.8.0.440, iOS build with "adt -package -target ipa-ad-hoc" fails with a linker error:
    ld: -pie can only be used when targeting iOS 4.2 or later
    What's the correct option to suppress this error or does it need a fix for adt?
    In the app.xml,
    <key>MinimumOSVersion</key>
                <string>5.0</string>
    is already present in the iPhone InfoAdditions section.
    (Building the same app with AIR 3.8.0.370 is fine)

    Hi,
    Can you make sure that both your old ane and new ane are not present in your extensions directory.
    Also, how are you zipping/unzipping the ANE?
    If you are on a Mac, try these steps on the terminal:
    1) Create a new temp directory, say temp (mkdir temp)
    2) cd temp
    3) Copy the ane you need to make changes to into this directory.
    4) unzip nameofane.ane
    5) rm nameofane.ane
    6) Make changes to the platform.xml file using a text editor or vim
    7) cd to the temp directory again, (if you are now elsewhere)
    8) zip -r nameofane.ane .
    9) Copy the ane file created into your extensions directory, where you have placed the other extensions and then, package the IPA using adt.
    If you are on Win,
    1) Rename the .ane to .zip
    2) Extract the contents of .zip
    3) Make changes to platform.xml and save it.
    4) Go back to the directory where you extracted the files, select all the folders/files and right click to zip them back.
    5) Rename the .zip to .ane and then, package the IPA.
    It should work.

  • Use your own iOS app on your own iOS device without buying a developer program.

    This is no question; it is simply a request that you make it possible for people with the free developer program to use their own iOS apps that they built themselves without having to pay $99 a year.
    This is because loads of people want to build small apps for themselves, and can do so easily now that Xcode is free on the AppStore. The main problem with this is that they have to pay to simply do this.
    So this is in a way a petition for all you people who are the same; who have written your own iOS apps for your personal use only, apps that shall not be distributed and only serve to show what you can do or help a family game to get Apple to make this small thing possible for you (us).
    So please post here if you want the same.
    Thank you.

    As always, feel free to use Report a Bug for any samples, doc additions, feature requests or enhancements you'd like to see as well. Add your BR# to this thread for reference, thanks.
    But I wouldn't hold my breath on this one....it would only result in immediate scams.

  • Using Mountain Lion iOS and audio output will not change from internal speakers to AppleTV so that sound can come from TV speakers, why??

    I am using Mountain Lion iOS and trying to connect my MacBook Pro to my plasma TV using AppleTV and AirPlay mirroring.     The video does just fine.     However, there is no audio coming from the TV.     After activating AirPlay I try to select Apple TV as the audio output in System Preferences and it highlights it but then immediately goes back to Internal Speakers and only has sound coming from the MacBook Pro..
    What's going wrong ?????
    AJ

    Are you sure that WIFI network doesn't have an AppleTV on it?  Just because you don't own it doesn't mean there isn't one on that network.  The laptop or better said the OS cannot differentiate between an AppleTV that you own or not.  If it sees one on the network, it will show you one as being available.  The automatic reconnection is happening probably because the last time you streamed to an AppleTV, you didn't drop that connection before sleeping the computer or shutting down iTunes.

  • Using Pages with iOS. How do I reduce image file size when I create a document with embedded images?

    Hi,
    I have created an annual family news letter in Pages on my iPad which incorporates pictures of events, holidays, occasions etc etc. I've then gone to covert it to pdf with the intention of sharing it via email but get a warning message about the resulting file size (in this case 16Mb).
    Is there any way of reducing the file size - which is obviously being driven by the images?  The pics are being pulled in from the iPad photo library.
    Thanks Mike

    (1) you are asking about Pages for iOS in a forum dedicated to Pages for OSX.
    Most of us aren't using Pages for iOS so it would be more efficient to ask in the forum dedicated to iWork for iOS (at this time this discussion area isn't divided in three areas).
    https://discussions.apple.com/community/app_store/iwork_for_ios
    (2) As you understood why your file is huge, the answer is simple : reduce the size of your picture files before inserting them in Pages documents.
    Drop the unneeded areas, reduce the resolution in tools dedicated to image processing before inserting them.
    Yvan KOENIG (VALLAURIS, France) mercredi 21 décembre 2011 18:32:19
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community

  • How to embed and launch ipa file from another ipa package created using Air for iOS

    Hi Guys,
    Anybody out there knowing how to embed and launch ipa file from another ipa package created using Air for iOS ?
    I am having 1 ipa file created using Xcode, Now i need to include that file in my ipa Package which is created using Flash CS 5.5 and Air for iOS. Also i need to know how to open my 1st ipa file from AS3 ?
    Thanks,

    Hi Sir,
    Thanks for your reply.
    But in that case user need to download 2 applications right. I need user to download my parent application created using Flash and that package contain one more ipa created using Xcode, so from my parent app only user should able to open my 2nd app. Is there any way to do that?
    Ps:  I am not talking about in-app but 2 individual apps inside one package.

  • Will you be able to use Siri on iOS 6 with the iPad 2?

    Will you be able to use Siri on iOS 6 with the iPad 2?

    http://www.apple.com/ios/ios6/siri/
    *Siri will be available only on iPhone 4S and iPad (3rd generation) and requires Internet access. Siri may not be available in all languages or all areas, and features may vary by area. Cellular data charges may apply.
    Major League Baseball trademarks and copyrights are used with the permission of MLB Advanced Media, L.P. All rights reserved.
    Now you know what we do.

  • I use a mac ios and shoot raw in a cannon 5d mark ii and shortly upon import of my images lightroom darkens and changes my images. This has happened before but not every time. The strange part is my last shoot had the same camera setting but this did not

    I use a mac ios and shoot raw in a cannon 5d mark ii and shortly upon import of my images lightroom darkens and changes my images. This has happened before but not every time. The strange part is my last shoot had the same camera setting but this did not happen. The images i have now i can not use after lightroom has automatically altered them even if i try editing back to how they looked upon import

    First thing to do is to change the default camera profile applied in Lightroom to camera standard (assuming that you shoot Canon or Nikon). Also make sure that your camera is NOT set up to use any of the HDR modes. Nikon calls those Active Dynamic Lighting. On Canons you often see things like highlight priority mode or "Auto Lighting Optimizer". Make sure that the picture style is set to standard and that for newer Canons the HDR mode is turned off. Most of the HDR modes simply underexpose the image and then add an instruction in the raw file to compensate for this to prevent highlights from being blown out. This causes more noise in the shadows and if you know what you are doing there is no point to this as you should simply expose correctly and get the highest quality raw.
    Lastly, make sure that in Lightroom you have not checked "Apply Auto Tone Adjustments" in Preferences->Presets. This should make the default rendering of the raw files the same as the in-camera jpeg (what the camera shows on the back even if you shoot raw) but still give you all the latitude of raw files.

  • What's a good speaker to use in an iOS Garageband Jam session ?

    What's a good speaker to use in an iOS Garageband Jam session ?
    Really I want to connect a few iOs devices together to create a loud sound...
    Any thoughts....

    Snapping with the iPhone is great when you out and want to catch something, but the care needed to capture a sheet of music requires focus, lack of keystoning (that's the big one - you're really going to have that lens absolutely perpendicular to the centre point of the sheet, and ignore any distortion towards the edges?).
    Sorry - if you want to reproduce music at a decent level, it has to be a scanner.

  • Which songs are used in the iOS 7 video?

    I really want to know if the songs used in the iOS 7 prom video is a created soundtrack or if it is real songs.

    Thanks Johnathan. Not the neatest way, but I'll create a JPEG with the title in it....good thinking

  • Using the native iOS video player?

    I would like to learn more about using the iOS native video player in my Adobe Air app.
    I understand that you can launch the native iOS video player by using StageWebView.
    What are some of the limitations of using the native IOS player with this method?
    Can I not limit the user's control of the playback controls so the user cannot fastforward thru an ad video?
    Once the video is done, can I auto start to a new video?
    When the user clicks the DONE/BACK button, can I close the StageWebView?
    Are there other ways to launch the iOS native player instead of using StageWebView?
    Is anyone creating a Native Extension for the iOS native video player?
    If you were to create an app using native iOS code instead of Adobe AIR, what can you do with the native player that you can't control using Adobe Air?
    thanks!
    Jack

    Hi, Jack:
    My answers are based on what I have done:
    other than stageWebView, you can load native player from native UIWebview, and probably (I guess) directly open a video players.
    If you do it from UIWebview, you can have the full access control of the video player, and interaction between Flex and Objective-c is also supported.
    Regarding what we can do with the native player, I say we can do anything we want if it's loaded on the UIWebview.
    Let's say 'pause', you can make your native player to be paused in the flex code, besides directly click the pause button. The simple workflow is:
    Mapping 'pause' function to a objective-c function which triggers the native videoplayer pause function. One situation would be that you have HTML5 page only contains a video player, and java script functions to control the video (player pause, fullscreen etc).
    Therefore, you can just call those javascript functions from objective-c.
    You can also get information back from objective-c. Let's say you wanna do something after the video is finished, so the objective-c call javascript to listen end info of the video. then objective-c pass this information back to flex as an event. The Flex side catches this event and maps this event into Flex event for your use.
    If there is a way to direcly invoke native player, those steps above will be much simpler, but I haven't tried. I am sure someone is doing that, hopefully they can answer you here.
    Regards,
    Matthew

  • Using Mail under iOS 5 Mail continues to suggest addresses that have been removed from Contacts. How do I remove old adreesses?

    Using Mail under iOS, 5 Mail continues to suggest addresses that have been removed from Contacts. How do I remove old, obsolete adreesses no longer in Contacts?

    If you open Mail and then in its File menu at the top, click on Window and choose Previous Recipients, you'll get a popup window listing them. At that point, you can highlight and delete any/all.

  • Using iMessage on iOS 8 with family sharing can other people linked to the account see my iMessages? We each have our own apple IDs.

    Using iMessage on iOS 8 with family sharing can other people linked to the account see my iMessages? We each have our own apple IDs.

    no… the way to confirm is make sure in settings>messages>send and receive that all the apple ids are different in there.

  • How can i activate iPhone without apple id ? It is used iphone 5 , ios 7 , no other information. May be i can do something with developer account ? another way?

    It is used iphone 5 , ios 7 , no other information. May be i can do something with developer account ? another way?

    That's the entire point of the update. To prevent unauthorized activation of an iPhone. To discourage Theft.
    If there was a way around it, it would defeat its purpose.
    The only way to get past that is to contact the original owner and ask that they remove the lock with their Apple ID.

Maybe you are looking for