现有项目适配Mac Catalyst
- Building for Mac Catalyst is not supported by the legacy build system.
- No such module ' swift 相关的一些库'
- OpenGLES is deprecated and is not available when building for Mac Catalyst.
- Pods/WechatOpenSDK/OpenSDK1.8.7.1/libWeChatSDK.a(WechatAuthSDK.o), building for Mac Catalyst, but linking in object file built for iOS Simulator,...for architecture x86_64
- Mac Catalyst上线问题
一个古老的iOS项目适配 Mac Catalyst 鬼知道有多少坑,下面是我亲手埋的一些坑,希望对大家有所帮助。
Building for Mac Catalyst is not supported by the legacy build system.
解决方法:file -> Workspace settings
No such module ’ swift 相关的一些库’
小编项目是用swift开发的,项目中遇到所有的swift相关库都找不到了。类似下图:
或
解决方法:
如果上边还不行将pods也加入。
OpenGLES is deprecated and is not available when building for Mac Catalyst.
1、搜索OpenGLES。如果项目中用到了,解决方法如下:
2、如果一些三方SDK中使用到OpenGLES。需要手动导入一下相关SDK。
以BaiduMap为例 在TesT_Bridging_Header中修改如下:
#ifndef TesT_Bridging_Header_h
#define TesT_Bridging_Header_h
#if !TARGET_OS_MACCATALYST
#import <BaiduMapAPI_Base/BMKBaseComponent.h>
#endif
#endif
Pods/WechatOpenSDK/OpenSDK1.8.7.1/libWeChatSDK.a(WechatAuthSDK.o), building for Mac Catalyst, but linking in object file built for iOS Simulator,…for architecture x86_64
手动导入libWeiboSDK
#ifndef TesT_Bridging_Header_h
#define TesT_Bridging_Header_h
#if !TARGET_OS_MACCATALYST
#import "WXApi.h"
#endif
#endif
在使用到WXApi的地方进行判断
#if !targetEnvironment(macCatalyst)
extension AppDelegate : WXApiDelegate {
}
#endif
如果手动导入之后还会报Pods/WechatOpenSDK/OpenSDK1.8.7.1/libWeChatSDK.a(WechatAuthSDK.o), building for Mac Catalyst, but linking in object file built for iOS Simulator,…for architecture x86_64
删除
Mac Catalyst上线问题
ERROR ITMS-90242: "The product archive is invalid. The Info.plist must contain a LSApplicationCategoryType key, whose value is the UTI for a valid category. For more details, see "Submitting your Mac apps to the App Store"."
在Info.plist添加
LSApplicationCategoryType
public.app-category.business