
Object C
游鱼_
cocos, ios, android,php
展开
-
xcode The archive contains nothing that can be signed
cocos creator 2.2.2发布ios到appstore时报错The archive contains nothing that can be signed.Verify that your build process has compiled binaries and copied in bundled resources.选中项目-》Targets->Build Settings->User-defined->VALID_ARCHS 将值改为arm64既可项目原创 2021-12-27 16:05:29 · 2774 阅读 · 0 评论 -
ios appsflyer firebase 接入Analytics
cocoscreator 需要使用 appsflyer firebase 的Analytics以下是使用方法,在cocos中调用ios方法,传事事件名,事件数据对像json字符串,在ios中把对像json字符串转换为NSDictonary//appsflyer 记录事件+(void)recordEventAF:(NSString*)eName jsonStr:(NSString*)jsonStr{ NSData* jsonData = [jsonStr dataUsingEnc原创 2021-04-10 10:26:34 · 803 阅读 · 0 评论 -
XCode12模拟器编译第三方库失败 building for iOS Simulator-arm64
building for iOS Simulator, but linking in object file built for iOS今天升级了XCode12,发现模拟器编译报错:是linker链接器报了错:building for iOS Simulator-arm64 but attempting to link with file built for iOS Simulator-x86_64原来xcode12模拟器已经用arm架构来编译项目了,而link链接的还是x86架构临.转载 2021-04-06 11:29:20 · 3126 阅读 · 0 评论 -
iOS 调用系统分享 cocos creator
在没有指定分享样式的情况下,调用系统分享无非是最简单快捷的实现方法,系统分享界面如下:你可以通过以下代码调用系统分享组件: UIActivityViewController *activity = [[UIActivityViewController alloc] initWithActivityItems:@[] applicationActivities:nil];[self presentViewController:activity animated:YES completio...原创 2021-01-18 17:40:34 · 1403 阅读 · 0 评论 -
cocos creator ios 接入 facebook sdk login
主程序是cocos creator发布ios时要接facebook登录的sdkcocos creator 发布ios版本后按官方文档配置接入,碰到以下问题执行sudo gem install cocoapods安装cocoapods时报错,使用brew安装了cocoapods# ruby -e "$(curl -fsSL [https://raw.githubusercontent.com/Homebrew/install/master/install](https://raw.github原创 2021-01-08 17:40:30 · 1404 阅读 · 0 评论 -
iOS获取设备的唯一标识的方法
各种获取设备唯一标识的方法介绍 一.UDID(Unique Device Identifier) UDID的全称是Unique Device Identifier,它就是苹果iOS设备的唯一识别码,它由40位16进制数的字母和数字组成(越狱的设备通过某些工具可以...转载 2021-01-08 17:14:43 · 2288 阅读 · 0 评论 -
cocos creator The file “app name” couldn‘t be opened because you don’t have permission to view it
Running my app with Xcode 12 and show this :1."Targets->Build Setting ->VALID_ARCHS ", Click delete on the keyboard 2."Targets->Build Setting ->Excluded Architectures", Click delete on the keyboardcocos creator 2.2,编译后用xcode12打开会提示上..原创 2020-12-22 15:23:44 · 368 阅读 · 0 评论 -
Mac安装nginx配置过程
mac电脑系统重装了,记录一下安装nginx的过程:1、打开终端2、安装Command Line tools?xcode-select --install3、安装brew命令?1ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"4、安装nginx?1brew install nginx5、启动ngin...转载 2020-11-23 17:30:31 · 971 阅读 · 0 评论 -
Object C基础语法
Object C基础语法1.关键字 基本上所有关键字都是以@开头 @interface @implementation @end @public @protected @private @selector @try @catch @throw @finally @protecal @optionl @required @c...转载 2020-11-20 16:18:21 · 1252 阅读 · 0 评论 -
UIImage加载本地图片资源
图片读取根据是否将创建好的对象缓存入系统内存,有两类创建UIImage 对象的方法可选:UIImage//缓存:+ imageNamed:,只需传入文件名.扩展名(可选)即可。 //不缓存:+ imageWithContentsOfFile:,必须传入文件的全名(全路径+文件名)。注意,对于有缓存功能的方法来说,其创建对象的步骤如下: 根据图片文件名在缓存池中查找特定的UIIm...原创 2020-04-22 14:26:37 · 1137 阅读 · 0 评论 -
CocosCreator 生成sdk静态库供 IOS原生工程开发调用、调试
1,引言CocosCreator引擎为Cocos开发团队开发的一款游戏引擎。其前身基于Cocos2d-x,以及Ricardo Quesada早期为苹果公司iPhone平台开发的Cocos2D游戏引擎,其以内容创作为核心,实现了脚本化、组件化和数据驱动的游戏开发工具。 具备了易于上手的内容生产工作流,以及功能强大的开发者工具套件,可用于实现游戏逻辑和高性能游戏效果。目前最新版本为 Co...原创 2020-04-22 14:22:41 · 2174 阅读 · 0 评论 -
iOS开发之强制横竖屏
步骤和代码第一步 :Appdelegate文件中设置#import <UIKit/UIKit.h>@interface AppDelegate : UIResponder <UIApplicationDelegate>@property (strong, nonatomic) UIWindow *window;//在AppDelegate.h文件中设置两...原创 2020-04-22 13:53:08 · 1238 阅读 · 1 评论 -
iOS Xcode快捷键大全(常用)
guang.png如果你的英文还不错可以来这里自己查看所有的快捷键大全(当然也可以自定义修改):位置:Xcode -> Preferences -> Key Bindingsguang00.png如果你懒得看,下面这些足够你在开发过程中使用了:guang01.pngguang01分别对应快捷键 :Command + 1~8...原创 2020-04-22 13:51:48 · 1004 阅读 · 0 评论 -
xcode中的inherited 意思就是继承的project中的配置
在折腾Xcode中去配置头文件搜索路径的时候,看到有个inherited:xcode header search path inherited而另外的项目,由于没加这些参数,导致编译出错,找不到头文件。所以要去搞清楚:Xcode $(inherited)参考:[IOS] Xcode中 Search Paths的设置 – Bmmboo的专栏 – 博客频道 – youkuaiyun.com...转载 2020-04-22 13:49:29 · 1633 阅读 · 0 评论 -
cocos 旋转屏幕实现方案,ios和android
ios:附一段解决方案,在原生代码里,旋转之前将屏幕方案设置成未知的,然后再设置自己想要的方向。如果用户锁定了屏幕方案,此方法依然有效。+(void)setOrientation:(NSString*)dir{ [[UIDevice currentDevice] setValue:[NSNumber numberWithInteger:UIDeviceOrientati...原创 2020-04-22 13:46:08 · 1177 阅读 · 0 评论 -
xcode环境设置 关于“search path”------$(inherited)
关于“search path”-------------只想说先注意这个$(inherited),这个是target在设置自己路径的时候如果加了这个,那么就是继承project里设置的路径。如果不需要继承就不加,要不然乱加有可能整混导致路径错误。再者带引号的路径和不带引号的路径,网上搜了下 带引号主要是预防路径里有空格导致本来一个路径变成了两个路径,因为空格分开就被...原创 2020-04-10 16:44:07 · 2214 阅读 · 0 评论 -
Error Domain=PlugInKit Code=13 "query cancelled" UserInfo={NSLocalizedDescription=query cancelled}
ios上调用了个系统相册上传到服务器,就出现了这个错误[discovery] errors encountered while discovering extensions: Error Domain=PlugInKit Code=13 "query cancelled" UserInfo={NSLocalizedDescription=query cancelled}很迷。。。查了查...原创 2019-08-14 10:03:08 · 1349 阅读 · 0 评论 -
ios 图片转成base64编码
ios 图片转成base64编码 //图片转base64 UIImage *image = [UIImage imageNamed:@"eg"]; NSData *data = UIImageJPEGRepresentation(image, 1.0f); NSString *encodedImageString = [data base64Encod...转载 2019-08-14 17:31:39 · 2191 阅读 · 0 评论 -
修改UIImage 宽高并压缩
//原始图UIImage *image = [info objectForKey:@"UIImagePickerControllerEditedImage"]; NSData *data; CGFloat fixelW = image.size.width; CGFloat fixelH = image.size.height; ...原创 2019-08-15 11:03:13 · 694 阅读 · 0 评论 -
NSString,NSData,std::string,const char*相互转化
NSString:NSString *string;(1)NSString -> NSData:NSData *data = [string dataUsingEncoding:NSUTF8Str...原创 2019-08-12 11:10:45 · 454 阅读 · 0 评论 -
Objective-C的NSLog方法
...原创 2019-08-13 17:11:25 · 303 阅读 · 0 评论