Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How can replace UIWebView with  WKWebView 

in Questions Posts: 31

When I submit my code to App Store, I got a response;
"ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of apps that use UIWebView APIs . See https://developer.apple.com/documentation/uikit/uiwebview for more information. After you’ve corrected the issues, you can upload a new binary to App Store Connect."
The UIWebView.h is included in the Frameworks/UIKit.frameworks/Headers folder in the exported zip file from Codea. But it looks we need to use WKWebView instead of UIWebView.
Please tell me the way to replace in order to clear the Apple's requirement.

Comments

  • SimeonSimeon Admin Mod
    Posts: 5,121

    @Makoto good question. I've updated the Runtime to not depend on UIWebView and will re-build the frameworks for Codea 3.0.1 (next update)

  • SimeonSimeon Admin Mod
    Posts: 5,121

    3.0.1 is released now so you could try exporting from the latest version

  • Posts: 31

    Simeon,
    Thank you for your taking effort to accommodate changes in Xcode.
    However, I encounter another problem in Xcode with my projects zipped from the new Code 3.0.1.

    The error message is:
    ld: bitcode bundle could not be generated because '/Users/ishizuka/Desktop/DAanimation/DAanimeV2a/Frameworks/CraftKit.framework/CraftKit' was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build file '/Users/ishizuka/Desktop/DAanimation/DAanimeV2a/Frameworks/CraftKit.framework/CraftKit' for architecture arm64

    I tried another project which was successfully built with the former Codea and got the same error. It looks there is another issue in the Framewroks included in the zipped project by Codea.

    Please let me know the way to avoid the error.

    Thanks, Makoto

  • edited January 18 Posts: 1,520
    @Makoto - are you running Xcode on Mac with Catalina? The latest OS needs all 64 bit code. I think it also requires registration with Apple to run compiled apps.
  • Posts: 31

    Big_G, thank you for your prompt comment.
    Yes I am running Xcode on Mac-Book Pro 9.2(mid 2012) with Catalina(macOS 10.16.2)
    So, how can I switch to 64bit code and get registration with Apple?

  • Posts: 31

    Using former version of Codea, there were no issues regarding "full bit code", except for the use of UIWebView. For me, this is the new phenomena with Codea 3.0.1

  • Posts: 31

    @Big_G - according to Apple's comment, it looks the source of this problem is the Frameworks/CraftKit.framework/CraftKit included in the zipped project by Codea 3.0.1. which was not included with former Codea version.
    Do you mean I need to register to Apple to feed Codea project to Xcode?

  • Posts: 1,520

    @Makoto - not sure how to get registration - thought you would have to submit code in usual way. I would expect there is an option in Xcode to get round this. Never used Xcode in anger.

    Curious, I have Catalina 15.2 on my Mac, driving me round the bend, is your 16.2 an update or a misprint?

  • SimeonSimeon Admin Mod
    Posts: 5,121

    @Makoto hmm thank you for reporting that issue, I wonder what's going on with the lack of bitcode in CraftKit. Will look into it

    You could try disabling Bitcode in the Xcode build settings for now

  • Posts: 31

    @Bir_G Thank you for your taking attention. Actually the version is 15.2,it was a typo, sorry.

    @Simeon thank you for your suggestion. However, since I have no clue about Xcode, I just deleted CraftKit under frameworks and related lines calling them. Then I got a new error message on ToolKit;

    Bitcode bundle could not be generated because '/Users/ishizuka/Desktop/CircumferentialAngleV1Ph3 2/Frameworks/ToolKit.framework/ToolKit' was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build file '/Users/ishizuka/Desktop/CircumferentialAngleV1Ph3 2/Frameworks/ToolKit.framework/ToolKit' for architecture arm64

    Can I delete ToolKit as well?

  • SimeonSimeon Admin Mod
    Posts: 5,121

    @Makoto you can't really delete any of them, but if you go into your project (click the blue blueprint icon in the project navigator), then go to Build Settings, find the Enable Bitcode setting and set it to "No", that should work

    Is this happening when you try to build and run to a device? Or is it only happening when you Archive? It's odd because I am able to build and run exported projects with Bitcode here

  • Posts: 31

    @Simeon Thank you for your instruction.
    But I face another problem in the Archive organizer Window.

    1. I can build and run on devices directly connected to Mac.
    2. I managed to find "Build settings" tab and switch "Enable Bitcodes" to No. Then I can make an Archive.
    3. However, when I "Varidate App" in the Organizer Window, I get an error message " Couldn't find platforms familiy for "AudioKit.framework" saying
      -- Couldn't find CFBundleSupportedPlatforms in the info.list or L/C.VERSION_MIN in the Mach-O for path "User//Library/Developer/Xcode/Archives/2020-02-29/.xcarchive/Products/<App's name>.app/Frameworks/AudioKit.frameworke"

    It looks Codea3.0.1 doesn't work well with my Mac. Since former version of Codea is able to make successful archives, except for the usage of UIWebView, is there any way to use WKWebView instead of UIWebView in the former version of Codea?

  • SimeonSimeon Admin Mod
    Posts: 5,121

    @Makoto I'm going to look into your archive / validation error now

  • Posts: 31

    @Simeon
    Thank you for your keeping attention on my issue, but I got another syndrome!
    Since you can go through the project create with Code 3.0.1 with Xcode, I guess either my iPad or Mac has problem. In order to separate the source of the problem, I installed Codes 3.0.1 on my another iPad as well as iPhone6. Then I delivered the same code to those devices through Air Drop and made zipped project for Xcode.
    Then I tried to compile them in Xcode and got strange results;
    1. The first iPad which caused the error I reported above has the bitcode error in CraftKit, but for AudioKit.
    2. The second iPad ends up the error "error: module compiled with Swift 5.0 cannot be imported by the Swift 5.1.3 compiler: /Users//Frameworks/RuntimeKit.framework/Modules/RuntimeKit.swiftmodule/arm64.swiftmodule"
    3. The iPhone resulted the same error as the second iPad.

    Maybe you will not be able to reproduce the situation, but it will be helpful for me to contact Apple if you can suggest your guess about the source of the problem.
    Thanks -Makoro

  • SimeonSimeon Admin Mod
    Posts: 5,121

    @Makoto I'm doing a big update to Codea and the runtime at the moment, so when these new features are finished I'll be updating the Xcode export to work with it. When I do this I'll make sure I can submit an app to Apple using the Archive feature.

Sign In or Register to comment.