How can replace UIWebView with  WKWebView 

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 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.

@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)

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

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

@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.

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?

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

@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?

@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?

@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

?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?

@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

@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?

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

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

@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.

@ Simeon How are you doing under this corona situation? With regard to my issue above, meantime I asked Apple Tech support for help. However, they decided the issue is on the third party app, i.e. Codea and declined my request. So, I still need your help. If you like, I can send a simple project, a boiler plate project created by Codea, which still has this issue. How can I send the zip file to you?

@Makoto are you able to delete the frameworks from the Frameworks/ folder and try rebuild your project? I’ve updated all the frameworks to 3.1

You may still experience the bitcode issue but you can disable bitcode for now to work around it

@Makoto i have the same problem as you when trying to validate the app in the xcode organiser. I think we have to add cfbundleSupportedPlatform in the build somehow, but dont know how to do it, so am stuck like you. @Simeon we need you!

@Siemon I tried Codea 3.1 on iOS 12.4, then the bitcode error was disappeared, however, I got a new error:
“compiling for iOS 12.1, but module ‘RuntimeKit’ has a minimum deployment target of iOS 12.4: /Users/ishizuka/Desktop/Codea3.1/CircleV201A/Frameworks/RuntimeKit.framework/Modules/RuntimeKit.swiftmodule/x86_64.swiftmodule”
I have no idea how iOS 12.1 was involved.

With regard to you suggestion, I deleted Frameworks folder in the zipped project and tried to build the modified project in Xcode.
Then I get an error:
“Failed to Download Codea Library. Please ensure you have an active Internet connection.
/Users/ishizuka/Library/Developer/Xcode/DerivedData/CircleV201A-bnykztkdamjkwkapslhmtxypdxhi/Build/Intermediates.noindex/ line 17: return: can only `return’ from a function or sourced script”, though I have an active Internet connection.