<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><br></div><div>Turns out this is working:</div><div><br></div><div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"><span style="color: #4f8187">TagLib</span>::<span style="color: #4f8187">ID3v2</span>::<span style="color: #4f8187">Frame</span> *frame =l[<span style="color: #31595d">i</span>];</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">tag-><span style="color: #31595d">removeFrame</span>(frame);</div></div><div><br></div><br><div apple-content-edited="true">
<div style="color: rgb(0, 0, 0); font-family: Helvetica;  font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="color: rgb(0, 0, 0); font-family: Helvetica;  font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="color: rgb(0, 0, 0); font-family: Helvetica;  font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="color: rgb(0, 0, 0); font-family: Helvetica;  font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="color: rgb(0, 0, 0); font-family: Helvetica;  font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;  "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;  "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;  "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;  "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Christopher </div><div><br></div><div><br class="Apple-interchange-newline"></div></div></span></div></span></div></span></div></span></div></span></div></div></div></div></div><br class="Apple-interchange-newline">
</div>
<br><div><div>On Mar 26, 2014, at 1:52 PM, Christopher Scott <<a href="mailto:chris@phatfly.com">chris@phatfly.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">OK, I got taglib and cmake to work together and now have a library and headers files that work with armv6, armv7 and armv7s.  I thought I included i386 but I am getting errors when compiling for the sim.  Though, it works fine on the device and ultimately this is the goal … so I happy with this so far.  Later I will look at what is going on that i386 isn’t getting included.  I am new to cmake and it’s processes so I will leave this for a rainy day or if I need to support it later.<div><br></div><div>I have been able to bring id3 editing code to my iOS project that another coworker wrote for mac.  While his code works for his project, because I believe that he is not hitting the remove case, I have tested it and it’s bothering me that it’s not working correctly.  The code looks for a PRIV frame and is suppose to remove it.  I think what is going wrong with the code that my coworker wrote is it’s trying to remove the frameListMap entry and not the actual frame.</div><div><br></div><div>Does anyone know how to correctly remove the priv frame?  I have to inject a uits payload that is specific to my user.  If I comment out the "<span style="font-family: Menlo; font-size: 11px;">tag-></span><span style="font-family: Menlo; font-size: 11px; color: rgb(49, 89, 93);">removeFrame</span><span style="font-family: Menlo; font-size: 11px;">(l[</span><span style="font-family: Menlo; font-size: 11px; color: rgb(49, 89, 93);">i</span><span style="font-family: Menlo; font-size: 11px;">]);” </span>line in the code below, I stop getting errors, but then if there is a previous priv frame with uits data, this code adds a second entry to the priv tag.  Chances are that the track files that my app downloads will never contain a priv tag or uits data (unless I put it there already), but it would be nice to know that the code is only allowing one entry in the priv frame.</div><div><br></div><div><br></div><div>Does this make sense?</div><div><br></div><div>Any ideas how to remove the priv frame?</div><div><br></div><div>Thanks!</div><div>Chris</div><div><br></div><div>Oh, I am able to write to the tag … just not remove the priv frame.</div><div><br></div><div>The code:</div><div><br></div><div><br></div><div><br></div><div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"><span style="color: #4f8187"><span class="Apple-tab-span" style="white-space:pre">              </span>TagLib</span>::<span style="color: #4f8187">ID3v2</span>::<span style="color: #4f8187">FrameList</span> l = f.<span style="color: #31595d">ID3v2Tag</span>()-><span style="color: #31595d">frameListMap</span>()[<span style="color: #d12f1b">"PRIV"</span>];</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;">                <br class="webkit-block-placeholder"></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">                <span style="color: #bb2ca2">for</span> (<span style="color: #bb2ca2">int</span> i = <span style="color: #272ad8">0</span>; i < l.<span style="color: #31595d">size</span>(); i++) {</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;">               <br class="webkit-block-placeholder"></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;">                    <br class="webkit-block-placeholder"></div><div style="margin: 0px;"><font face="Menlo"><span style="font-size: 11px;">                 </span></font><span style="font-family: Menlo; font-size: 11px; color: rgb(187, 44, 162);">if</span><font face="Menlo"><span style="font-size: 11px;"> (l[</span></font><span style="font-family: Menlo; font-size: 11px; color: rgb(49, 89, 93);">i</span><font face="Menlo"><span style="font-size: 11px;">]-></span></font><span style="font-family: Menlo; font-size: 11px; color: rgb(49, 89, 93);">toString</span><font face="Menlo"><span style="font-size: 11px;">() == </span></font><font color="#d12f1b" face="Menlo"><span style="font-size: 11px;">“ownerEmailAddress"</span></font><font face="Menlo"><span style="font-size: 11px;">)</span></font></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">                 {</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;">                     <br class="webkit-block-placeholder"></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">                     <span style="color: #703daa">cout</span> << l[<span style="color: #31595d">i</span>]-><span style="color: #31595d">toString</span>() << <span style="color: #3d1d81">endl</span>;</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;">                     <br class="webkit-block-placeholder"></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">                     <span style="color: #bb2ca2">const</span> <span style="color: #4f8187">TagLib</span>::<span style="color: #4f8187">ByteVector</span> v = <span style="color: #4f8187">TagLib</span>::<span style="color: #4f8187">ByteVector</span>::<span style="color: #31595d">fromCString</span>(UITSPayload, (<span style="color: #703daa">uint32_t</span>) <span style="color: #3d1d81">strlen</span>(UITSPayload));</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;">                     <br class="webkit-block-placeholder"></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">                     l[<span style="color: #31595d">i</span>]-><span style="color: #31595d">setData</span>(UITSPayload);</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">                     tag-><span style="color: #31595d">removeFrame</span>(l[<span style="color: #31595d">i</span>]);</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">                     tag-><span style="color: #31595d">addFrame</span>(l[<span style="color: #31595d">i</span>]);</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">                     found = <span style="color: #bb2ca2">true</span>;</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">                     <span style="color: #bb2ca2">break</span>;</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">                 }</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">                }</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">                <span style="color: #bb2ca2">if</span> (!found)</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">                {</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;">                <br class="webkit-block-placeholder"></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(79, 129, 135);"><span style="">                </span>TagLib<span style="">::</span>ID3v2<span style="">::</span>PrivateFrame<span style=""> *frame = </span><span style="color: #bb2ca2">new</span><span style=""> </span>TagLib<span style="">::</span>ID3v2<span style="">::</span>PrivateFrame<span style=""> ();</span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;">                 <br class="webkit-block-placeholder"></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">                    frame-><span style="color: #31595d">setOwner</span>(<span style="color: #d12f1b">"</span><span style="color: rgb(209, 47, 27);">ownerEmailAddress</span><span style="color: rgb(209, 47, 27);">"</span>);</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">                   <span style="color: #bb2ca2">const</span> <span style="color: #4f8187">TagLib</span>::<span style="color: #4f8187">ByteVector</span> v = <span style="color: #4f8187">TagLib</span>::<span style="color: #4f8187">ByteVector</span>::<span style="color: #31595d">fromCString</span>(UITSPayload, (<span style="color: #703daa">uint32_t</span>) <span style="color: #3d1d81">strlen</span>(UITSPayload));</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">                   frame-><span style="color: #31595d">setData</span>(v);</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;">              <br class="webkit-block-placeholder"></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">                  tag-><span style="color: #31595d">addFrame</span>(frame);</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">                    f.<span style="color: #31595d">save</span>();</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">                }</div></div></div></blockquote></div><br></body></html>