facebook 3.0.8支持iPhone5

FACEBOOK 3.0.8下载地址:https://github.com/facebook/facebook-ios-sdk/tree/sdk-version-3.0.8

参考如下文章:http://alexanderwong.me/post/32277225382/facebook-sdk-xcode-4-5-ios-6-0

Facebook SDK Xcode 4.5 iOS 6.0

If you’re seeing an error like the following in Xcode 4.5 have no fear!

file is universal (3 slices) but does not contain a(n) armv7s slice: ....FacebookSDK.framework/FacebookSDK for architecture armv7s

The downloadable version of Facebook’s iOS SDK hasn’t been updated to handle armv7 yet. You can, however, obtain a version built for armv7 by following the following steps:

  1. Download the official FB iOS SDK src here: https://github.com/facebook/facebook-ios-sdk
  2. Unzip the file and inside the “src” folder you’ll find an Xcode project. Open it up in Xcode 4.5.
  3. Under Targets > facebook-ios-sdk > Build Settings, change Architectures to “Standard (armv7, armv7s)”.
  4. Make sure the settings gets saved by reopening the project and making sure the correct architecture is still selected.
  5. Back in the FB iOS SDK base directory, go to the “scripts” folder and run build_all.sh.
  6. The script will create a folder named “FacebookSDK.framework” inside a folder named “build”. Copy “FacebookSDK.framework” and replace your original FB iOS SDK install (normally in ~/Documents/FacebookSDK/FacebookSDK.framework).
  7. Your original project should now build correctly.

If you want to wait for FB to release their own build or you have other libraries that you cannot rebuild the library files for, you can also continue to work on and build your project by removing “armv7s” from the “Targets > Build Settings > Architectures > Valid Architectures section.


Building Framework过程:

samuel-2:scripts yanjun$ sudo sh build_all.sh
Password:
Building Framework.
Compiling for platform: iphonesimulator.
Build settings from command line:
    CURRENT_PROJECT_VERSION = 0.1.20130221
    SDKROOT = iphonesimulator6.0
    SYMROOT = /Users/yanjun/Downloads/facebook-ios-sdk-sdk-version-3.0.8/build


在使用上面生成的3.0.8的包的过程中,发现其在IOS 6.0上报错。

 -[SBJsonParser errorTrace]: unrecognized selector sent to instance 0x48ad90
处理方案如下:

http://stackoverflow.com/questions/12301617/application-crash-on-login-in-ios-facebook-sdk-3-0

http://developers.facebook.com/bugs/202230616574138/

新库地址:

https://github.com/garthex/facebook-ios-sdk

https://github.com/facebook/facebook-ios-sdk/pull/481  ----In this pull request, I've upgraded SBJson from v2.2.3 to v3.1.1 for Facebook-iOS-SDK v3.0.7.

在将 wangEditor 从 3.0.8 升级到 5.x 版本时,需要关注几个关键步骤和注意事项。首先,由于版本跨度较大,API 和配置方式发生了显著变化,因此需要对现有代码进行相应的调整。 ### 升级步骤 1. **安装新版本** 使用 npm 或 yarn 安装最新版本的 wangEditor: ```bash npm install wangeditor --save ``` 或者 ```bash yarn add wangeditor ``` 2. **引入编辑器** 在项目中引入 wangEditor 并创建编辑器实例的方式有所变化。5.x 版本采用了模块化的方式,推荐使用如下方式引入: ```javascript import E from 'wangeditor' const editor = new E('#editor') editor.create() ``` 其中 `#editor` 是 DOM 元素的选择器,用于指定编辑器的容器[^1]。 3. **配置编辑器** 5.x 版本提供了更加灵活的配置选项,可以通过 `editor.config` 对象进行设置。例如,设置编辑器的菜单栏、上传图片的配置等: ```javascript editor.config.menus = [ 'head', // 标题 'bold', // 粗体 'fontSize', // 字号 'fontName', // 字体 'italic', // 斜体 'underline', // 下划线 'strikeThrough', // 删除线 'foreColor', // 文字颜色 'backColor', // 背景颜色 'link', // 插入链接 'list', // 列表 'justify', // 对齐方式 'quote', // 引用 'emoticon', // 表情 'image', // 插入图片 'table', // 插入表格 'video', // 插入视频 'code', // 插入代码 'splitLine', // 分割线 'undo', // 撤销 'redo' // 重做 ] ``` 4. **处理图片上传** 在 5.x 版本中,图片上传的配置更加灵活,可以通过 `editor.config.uploadImgServer` 设置上传服务器地址,并通过 `editor.config.uploadImgMaxSize` 设置上传图片的最大大小: ```javascript editor.config.uploadImgServer = '/api/upload' // 上传图片的服务器地址 editor.config.uploadImgMaxSize = 2 * 1024 * 1024 // 限制图片大小为 2MB editor.config.uploadImgTimeout = 3000 // 上传超时时间 ``` 5. **处理内容变化** 5.x 版本中,可以通过 `editor.txt.html()` 获取编辑器的内容,也可以通过 `editor.txt.text()` 获取纯文本内容: ```javascript const html = editor.txt.html() const text = editor.txt.text() ``` 6. **销毁编辑器** 如果需要销毁编辑器实例,可以调用 `editor.destroy()` 方法: ```javascript editor.destroy() ``` ### 注意事项 - **兼容性** 由于 5.x 版本与 3.0.8 版本存在较大的 API 差异,建议在升级前仔细阅读官方文档,确保所有功能都能正常工作。 - **样式调整** 5.x 版本的默认样式可能与之前的版本有所不同,可能需要对 CSS 样式进行调整以适应新的 UI 设计。 - **插件支持** 如果项目中使用了自定义插件,需要检查这些插件是否与 5.x 版本兼容,必要时进行更新或重写。 - **测试** 在正式环境中部署之前,务必进行全面的测试,确保所有功能都按预期工作。 通过以上步骤和注意事项,可以顺利地将 wangEditor 从 3.0.8 升级到 5.x 版本,并确保编辑器的功能和用户体验得到提升。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值